/**
 * 产品表
 */
import { Column, Entity, PrimaryColumn, PrimaryGeneratedColumn } from "typeorm";


@Entity('products')
export class Products {

  /** 自增主键 */
  @PrimaryGeneratedColumn()
  id: number;

  @PrimaryColumn()
  uuid: string;

  @Column()
  title: string;

  @Column({ name: 'img_url', type: 'varchar' })
  imgUrl: string;

  @Column()
  type: string;

  @Column()
  description: string;

  @Column()
  author: string;

  @Column()
  content: string;

  @Column({ type: 'json' })
  spec: string;

  @Column({ name: 'created_time', type: 'timestamp' })
  createdTime: Date;

  @Column({ name: 'updated_time', type: 'timestamp' })
  updatedTime: Date;

  @Column({ name: 'is_deleted', type: 'tinyint' })
  isDeleted: number;
}